package mest.dao.cxj;

import mest.VO.cxj.FinancialCostOrderVO;
import mest.entity.FinancialCostOrder;
import mest.entity.PlanCostOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface FinancialCostOrderDao {


    /**
     * 添加财务费用单记录
     */
    Integer insertFinancialCostOrder(@Param("fco") FinancialCostOrder fco, @Param("theirDb") String theirDb);

    /**
     * 查询全部财务费用单
     *
     * @return
     */
    List<FinancialCostOrderVO> selectAllFinancialCostOrder(@Param("page") Integer page, @Param("limit") Integer limit,
                                                           @Param("status") Integer status, @Param("content") String content,
                                                           @Param("theirDb") String theirDb);

    /**
     * 查询财务费用单数量
     *
     * @param theirDb
     * @return
     */
    Integer selectCountFinancialCostOrder(@Param("status") Integer status, @Param("content") String content,
                                          @Param("theirDb") String theirDb);

    /**
     * 修改实际费用单信息
     */
    Integer modifyFinancialCostOrder(@Param("fco") FinancialCostOrder fco, @Param("theirDb") String theirDb);

    /**
     * 完成财务费用单
     * @param id
     * @param theirDb
     * @return
     */
    Integer changeStatus(@Param("id") Integer id, @Param("theirDb") String theirDb);

    /**
     *  获取财务费用单信息
     * @param id
     * @param theirDb
     * @return
     */
    FinancialCostOrder selectFinancialCostOrderById(@Param("id")Integer id, @Param("theirDb")String theirDb);

    /**
     * 修改财务费用单金额
     * @param id
     * @param hasBennMoney
     * @param theirDb
     * @return
     */
    Integer updateFinancialCostOrderByMoney(@Param("id")Integer id, @Param("hasBennMoney") BigDecimal hasBennMoney,
                                            @Param("theirDb")String theirDb);
}